\(\int \frac {\cot (x)}{(a+b \tan ^4(x))^{3/2}} \, dx\) [402]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [F]
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F(-2)]
   Giac [F(-2)]
   Mupad [F(-1)]

Optimal result

Integrand size = 15, antiderivative size = 121 \[ \int \frac {\cot (x)}{\left (a+b \tan ^4(x)\right )^{3/2}} \, dx=\frac {\text {arctanh}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )}{2 (a+b)^{3/2}}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^4(x)}}{\sqrt {a}}\right )}{2 a^{3/2}}+\frac {1}{2 a \sqrt {a+b \tan ^4(x)}}-\frac {a+b \tan ^2(x)}{2 a (a+b) \sqrt {a+b \tan ^4(x)}} \]

[Out]

-1/2*arctanh((a+b*tan(x)^4)^(1/2)/a^(1/2))/a^(3/2)+1/2*arctanh((a-b*tan(x)^2)/(a+b)^(1/2)/(a+b*tan(x)^4)^(1/2)
)/(a+b)^(3/2)+1/2/a/(a+b*tan(x)^4)^(1/2)+1/2*(-a-b*tan(x)^2)/a/(a+b)/(a+b*tan(x)^4)^(1/2)

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.733, Rules used = {3751, 1266, 975, 755, 12, 739, 212, 272, 53, 65, 214} \[ \int \frac {\cot (x)}{\left (a+b \tan ^4(x)\right )^{3/2}} \, dx=-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^4(x)}}{\sqrt {a}}\right )}{2 a^{3/2}}+\frac {\text {arctanh}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )}{2 (a+b)^{3/2}}+\frac {1}{2 a \sqrt {a+b \tan ^4(x)}}-\frac {a+b \tan ^2(x)}{2 a (a+b) \sqrt {a+b \tan ^4(x)}} \]

[In]

Int[Cot[x]/(a + b*Tan[x]^4)^(3/2),x]

[Out]

ArcTanh[(a - b*Tan[x]^2)/(Sqrt[a + b]*Sqrt[a + b*Tan[x]^4])]/(2*(a + b)^(3/2)) - ArcTanh[Sqrt[a + b*Tan[x]^4]/
Sqrt[a]]/(2*a^(3/2)) + 1/(2*a*Sqrt[a + b*Tan[x]^4]) - (a + b*Tan[x]^2)/(2*a*(a + b)*Sqrt[a + b*Tan[x]^4])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 53

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n + 1
)/((b*c - a*d)*(m + 1))), x] - Dist[d*((m + n + 2)/((b*c - a*d)*(m + 1))), Int[(a + b*x)^(m + 1)*(c + d*x)^n,
x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] &&  !(LtQ[n, -1] && (EqQ[a, 0] || (NeQ[
c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 739

Int[1/(((d_) + (e_.)*(x_))*Sqrt[(a_) + (c_.)*(x_)^2]), x_Symbol] :> -Subst[Int[1/(c*d^2 + a*e^2 - x^2), x], x,
 (a*e - c*d*x)/Sqrt[a + c*x^2]] /; FreeQ[{a, c, d, e}, x]

Rule 755

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(-(d + e*x)^(m + 1))*(a*e + c*d*x)*
((a + c*x^2)^(p + 1)/(2*a*(p + 1)*(c*d^2 + a*e^2))), x] + Dist[1/(2*a*(p + 1)*(c*d^2 + a*e^2)), Int[(d + e*x)^
m*Simp[c*d^2*(2*p + 3) + a*e^2*(m + 2*p + 3) + c*e*d*(m + 2*p + 4)*x, x]*(a + c*x^2)^(p + 1), x], x] /; FreeQ[
{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && LtQ[p, -1] && IntQuadraticQ[a, 0, c, d, e, m, p, x]

Rule 975

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (ILtQ[m, 0] && ILtQ[n, 0])) &&  !(IGtQ[m, 0] || IGtQ[n, 0])

Rule 1266

Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[x^((m
 - 1)/2)*(d + e*x)^q*(a + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, c, d, e, p, q}, x] && IntegerQ[(m + 1)/2]

Rule 3751

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[c*(ff/f), Subst[Int[(d*ff*(x/c))^m*((a + b*(ff*x)^n)^p/(c^2
 + ff^2*x^2)), x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \frac {1}{x \left (1+x^2\right ) \left (a+b x^4\right )^{3/2}} \, dx,x,\tan (x)\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {1}{x (1+x) \left (a+b x^2\right )^{3/2}} \, dx,x,\tan ^2(x)\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \left (\frac {1}{(-1-x) \left (a+b x^2\right )^{3/2}}+\frac {1}{x \left (a+b x^2\right )^{3/2}}\right ) \, dx,x,\tan ^2(x)\right ) \\ & = \frac {1}{2} \text {Subst}\left (\int \frac {1}{(-1-x) \left (a+b x^2\right )^{3/2}} \, dx,x,\tan ^2(x)\right )+\frac {1}{2} \text {Subst}\left (\int \frac {1}{x \left (a+b x^2\right )^{3/2}} \, dx,x,\tan ^2(x)\right ) \\ & = -\frac {a+b \tan ^2(x)}{2 a (a+b) \sqrt {a+b \tan ^4(x)}}+\frac {1}{4} \text {Subst}\left (\int \frac {1}{x (a+b x)^{3/2}} \, dx,x,\tan ^4(x)\right )+\frac {\text {Subst}\left (\int \frac {a}{(-1-x) \sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )}{2 a (a+b)} \\ & = \frac {1}{2 a \sqrt {a+b \tan ^4(x)}}-\frac {a+b \tan ^2(x)}{2 a (a+b) \sqrt {a+b \tan ^4(x)}}+\frac {\text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\tan ^4(x)\right )}{4 a}+\frac {\text {Subst}\left (\int \frac {1}{(-1-x) \sqrt {a+b x^2}} \, dx,x,\tan ^2(x)\right )}{2 (a+b)} \\ & = \frac {1}{2 a \sqrt {a+b \tan ^4(x)}}-\frac {a+b \tan ^2(x)}{2 a (a+b) \sqrt {a+b \tan ^4(x)}}+\frac {\text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \tan ^4(x)}\right )}{2 a b}-\frac {\text {Subst}\left (\int \frac {1}{a+b-x^2} \, dx,x,\frac {-a+b \tan ^2(x)}{\sqrt {a+b \tan ^4(x)}}\right )}{2 (a+b)} \\ & = \frac {\text {arctanh}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )}{2 (a+b)^{3/2}}-\frac {\text {arctanh}\left (\frac {\sqrt {a+b \tan ^4(x)}}{\sqrt {a}}\right )}{2 a^{3/2}}+\frac {1}{2 a \sqrt {a+b \tan ^4(x)}}-\frac {a+b \tan ^2(x)}{2 a (a+b) \sqrt {a+b \tan ^4(x)}} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

Time = 0.64 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.89 \[ \int \frac {\cot (x)}{\left (a+b \tan ^4(x)\right )^{3/2}} \, dx=\frac {1}{2} \left (\frac {\text {arctanh}\left (\frac {a-b \tan ^2(x)}{\sqrt {a+b} \sqrt {a+b \tan ^4(x)}}\right )}{(a+b)^{3/2}}+\frac {\operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},1+\frac {b \tan ^4(x)}{a}\right )}{a \sqrt {a+b \tan ^4(x)}}-\frac {a+b \tan ^2(x)}{a (a+b) \sqrt {a+b \tan ^4(x)}}\right ) \]

[In]

Integrate[Cot[x]/(a + b*Tan[x]^4)^(3/2),x]

[Out]

(ArcTanh[(a - b*Tan[x]^2)/(Sqrt[a + b]*Sqrt[a + b*Tan[x]^4])]/(a + b)^(3/2) + Hypergeometric2F1[-1/2, 1, 1/2,
1 + (b*Tan[x]^4)/a]/(a*Sqrt[a + b*Tan[x]^4]) - (a + b*Tan[x]^2)/(a*(a + b)*Sqrt[a + b*Tan[x]^4]))/2

Maple [F]

\[\int \frac {\cot \left (x \right )}{\left (a +b \tan \left (x \right )^{4}\right )^{\frac {3}{2}}}d x\]

[In]

int(cot(x)/(a+b*tan(x)^4)^(3/2),x)

[Out]

int(cot(x)/(a+b*tan(x)^4)^(3/2),x)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 223 vs. \(2 (99) = 198\).

Time = 0.53 (sec) , antiderivative size = 954, normalized size of antiderivative = 7.88 \[ \int \frac {\cot (x)}{\left (a+b \tan ^4(x)\right )^{3/2}} \, dx=\text {Too large to display} \]

[In]

integrate(cot(x)/(a+b*tan(x)^4)^(3/2),x, algorithm="fricas")

[Out]

[1/4*((a^2*b*tan(x)^4 + a^3)*sqrt(a + b)*log(((a*b + 2*b^2)*tan(x)^4 - 2*a*b*tan(x)^2 - 2*sqrt(b*tan(x)^4 + a)
*(b*tan(x)^2 - a)*sqrt(a + b) + 2*a^2 + a*b)/(tan(x)^4 + 2*tan(x)^2 + 1)) + ((a^2*b + 2*a*b^2 + b^3)*tan(x)^4
+ a^3 + 2*a^2*b + a*b^2)*sqrt(a)*log(-(b*tan(x)^4 - 2*sqrt(b*tan(x)^4 + a)*sqrt(a) + 2*a)/tan(x)^4) + 2*sqrt(b
*tan(x)^4 + a)*(a^2*b + a*b^2 - (a^2*b + a*b^2)*tan(x)^2))/(a^5 + 2*a^4*b + a^3*b^2 + (a^4*b + 2*a^3*b^2 + a^2
*b^3)*tan(x)^4), 1/4*(2*((a^2*b + 2*a*b^2 + b^3)*tan(x)^4 + a^3 + 2*a^2*b + a*b^2)*sqrt(-a)*arctan(sqrt(b*tan(
x)^4 + a)*sqrt(-a)/a) + (a^2*b*tan(x)^4 + a^3)*sqrt(a + b)*log(((a*b + 2*b^2)*tan(x)^4 - 2*a*b*tan(x)^2 - 2*sq
rt(b*tan(x)^4 + a)*(b*tan(x)^2 - a)*sqrt(a + b) + 2*a^2 + a*b)/(tan(x)^4 + 2*tan(x)^2 + 1)) + 2*sqrt(b*tan(x)^
4 + a)*(a^2*b + a*b^2 - (a^2*b + a*b^2)*tan(x)^2))/(a^5 + 2*a^4*b + a^3*b^2 + (a^4*b + 2*a^3*b^2 + a^2*b^3)*ta
n(x)^4), 1/4*(2*(a^2*b*tan(x)^4 + a^3)*sqrt(-a - b)*arctan(sqrt(b*tan(x)^4 + a)*(b*tan(x)^2 - a)*sqrt(-a - b)/
((a*b + b^2)*tan(x)^4 + a^2 + a*b)) + ((a^2*b + 2*a*b^2 + b^3)*tan(x)^4 + a^3 + 2*a^2*b + a*b^2)*sqrt(a)*log(-
(b*tan(x)^4 - 2*sqrt(b*tan(x)^4 + a)*sqrt(a) + 2*a)/tan(x)^4) + 2*sqrt(b*tan(x)^4 + a)*(a^2*b + a*b^2 - (a^2*b
 + a*b^2)*tan(x)^2))/(a^5 + 2*a^4*b + a^3*b^2 + (a^4*b + 2*a^3*b^2 + a^2*b^3)*tan(x)^4), 1/2*((a^2*b*tan(x)^4
+ a^3)*sqrt(-a - b)*arctan(sqrt(b*tan(x)^4 + a)*(b*tan(x)^2 - a)*sqrt(-a - b)/((a*b + b^2)*tan(x)^4 + a^2 + a*
b)) + ((a^2*b + 2*a*b^2 + b^3)*tan(x)^4 + a^3 + 2*a^2*b + a*b^2)*sqrt(-a)*arctan(sqrt(b*tan(x)^4 + a)*sqrt(-a)
/a) + sqrt(b*tan(x)^4 + a)*(a^2*b + a*b^2 - (a^2*b + a*b^2)*tan(x)^2))/(a^5 + 2*a^4*b + a^3*b^2 + (a^4*b + 2*a
^3*b^2 + a^2*b^3)*tan(x)^4)]

Sympy [F]

\[ \int \frac {\cot (x)}{\left (a+b \tan ^4(x)\right )^{3/2}} \, dx=\int \frac {\cot {\left (x \right )}}{\left (a + b \tan ^{4}{\left (x \right )}\right )^{\frac {3}{2}}}\, dx \]

[In]

integrate(cot(x)/(a+b*tan(x)**4)**(3/2),x)

[Out]

Integral(cot(x)/(a + b*tan(x)**4)**(3/2), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {\cot (x)}{\left (a+b \tan ^4(x)\right )^{3/2}} \, dx=\text {Exception raised: RuntimeError} \]

[In]

integrate(cot(x)/(a+b*tan(x)^4)^(3/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: THROW: The catch RAT-ERR is undefined.

Giac [F(-2)]

Exception generated. \[ \int \frac {\cot (x)}{\left (a+b \tan ^4(x)\right )^{3/2}} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(cot(x)/(a+b*tan(x)^4)^(3/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Error: Bad Argument Type

Mupad [F(-1)]

Timed out. \[ \int \frac {\cot (x)}{\left (a+b \tan ^4(x)\right )^{3/2}} \, dx=\int \frac {\mathrm {cot}\left (x\right )}{{\left (b\,{\mathrm {tan}\left (x\right )}^4+a\right )}^{3/2}} \,d x \]

[In]

int(cot(x)/(a + b*tan(x)^4)^(3/2),x)

[Out]

int(cot(x)/(a + b*tan(x)^4)^(3/2), x)